@extends('www/zc-666/layout')
@section('title','众筹排行榜')
@section('content')
    <div class="order-list">
        <img class="show" src="/www/zc666/images/common/index-top.png">
        <img class="show title" src="/www/zc666/images/common/sort-title.png">

        <table id="order-content"></table>
        <div class="more" onclick="order.get_orders()">
            <img src="/www/zc666/images/icon/more.png">
            <p>加载更多</p>
        </div>
    </div>

    <script>
        window.onload = function(){
            order.get_orders();
        }

        function fresh_orders(orders,noEnd,page){
            var content = ''
            var i = 0;
            for(var order of orders){
                i++;
                if(page == 1){
                    if(i==1){
                        var sort = '<img class="iconimg" src="/www/zc666/images/icon/sort-gold.png">';
                    }else if(i==2){
                        var sort = '<img class="iconimg" src="/www/zc666/images/icon/sort-tong.png">';
                    }else if(i== 3){
                        var sort = '<img class="iconimg" src="/www/zc666/images/icon/sort-yin.png">';
                    }else{
                        var sort = i;
                    }
                }else{
                    var sort = i;
                }

                content += '<tr>'+
                    '<td style="width:60px;"><img class="head" src="'+order.wx_head+'"></td>'+
                    '<td>'+
                    '<p>'+order.wx_name+'</p>'+
                    '<p class="time">'+order.success_time+'</p>'+ '</td>'+
                    '<td class="sort-num">'+ sort +'</td>'+
                    '</tr>';
            }
            $('#order-content').append(content);
            if(noEnd){
                $('.more').show();
            }else{
                $('.more').hide();
            }
        }

    </script>
@endsection
